package com.esri.android.map.event;

import com.esri.core.io.EsriErrorCode;
import com.esri.core.io.EsriSecurityException;
import java.io.Serializable;

/* loaded from: classes.dex */
public interface OnStatusChangedListener extends Serializable {
    void onStatusChanged(Object obj, STATUS status);

    /* loaded from: classes.dex */
    public static class EsriStatusException extends Exception implements EsriErrorCode {
        public static final int INIT_FAILED = -1000;
        public static final int INIT_FAILED_ARCGIS_DYNAMIC_LAYER = -1002;
        public static final int INIT_FAILED_ARCGIS_FEATURE_LAYER = -1004;
        public static final int INIT_FAILED_ARCGIS_IMAGE_LAYER = -1003;
        public static final int INIT_FAILED_ARCGIS_TILE_LAYER = -1001;
        public static final int INIT_FAILED_BAD_URL = -4000;
        public static final int INIT_FAILED_BING_LAYER = -1005;
        public static final int INIT_FAILED_GRAPHICS_LAYER = -1006;
        public static final int INIT_FAILED_KML_LAYER = -1008;
        public static final int INIT_FAILED_LAYER_LOADING = -3010;
        public static final int INIT_FAILED_MAPVIEW = -2000;
        public static final int INIT_FAILED_MAPVIEW_BASE_LAYER = -2001;
        public static final int INIT_FAILED_OSM_LAYER = -1007;
        public static final int INIT_FAILED_RASTER_LAYER = -1009;
        public static final int INIT_FAILED_UNSUPPORTED_LAYER = -3002;
        public static final int INIT_FAILED_WEBMAP = -3000;
        public static final int INIT_FAILED_WEBMAP_UNSUPPORTED_LAYER = -3001;
        public static final int SPATIAL_REFERENCE_INVALID = -4010;
        private static final long serialVersionUID = 1;
        int a;

        static final String a(int i) {
            if (i == -4010 || i == -3010) {
                return "The layer cannot be loaded into the map as the spatial reference of the layer is not compatible with the spatial reference of the map.";
            }
            if (i != -2001) {
                if (i != -2000) {
                    switch (i) {
                        case INIT_FAILED_UNSUPPORTED_LAYER /* -3002 */:
                            return "A layer cannot be loaded into the map due to being an unsupported type.";
                        case INIT_FAILED_WEBMAP_UNSUPPORTED_LAYER /* -3001 */:
                            return "The MapView cannot be initialized with given WebMap URL, one of the WebMap Layer is unsupported.";
                        case INIT_FAILED_WEBMAP /* -3000 */:
                            return "The MapView cannot be initialized with given WebMap URL.";
                        default:
                            switch (i) {
                                case INIT_FAILED_GRAPHICS_LAYER /* -1006 */:
                                    return "The GraphicsLayer cannot be initialized.";
                                case INIT_FAILED_BING_LAYER /* -1005 */:
                                    return "The BingMapslayer cannot be initialized.";
                                case INIT_FAILED_ARCGIS_FEATURE_LAYER /* -1004 */:
                                    return "The ArcGISFeaturelayer cannot be initialized.";
                                case INIT_FAILED_ARCGIS_IMAGE_LAYER /* -1003 */:
                                    return "The ArcGISImageServiceLayer cannot be initialized.";
                                case INIT_FAILED_ARCGIS_DYNAMIC_LAYER /* -1002 */:
                                    return "The ArcGISDynamicMapServicelayer cannot be initialized.";
                                case INIT_FAILED_ARCGIS_TILE_LAYER /* -1001 */:
                                    return "The ArcGISTiledMapServiceLayer cannot be initialized.";
                                case -1000:
                                    return "The layer or MapView cannot be initialized.";
                                default:
                                    return "";
                            }
                    }
                }
                return "The MapView cannot initialized.";
            }
            return "The base layer of the MapView cannot be initialized.";
        }

        public EsriStatusException(int i) {
            super(a(i));
            this.a = i;
        }

        @Override // com.esri.core.io.EsriErrorCode
        public int getCode() {
            return this.a;
        }

        @Override // java.lang.Throwable
        public String toString() {
            return "EsriStatusException [code:" + this.a + ", Message:" + getMessage() + "]";
        }

        @Override // com.esri.core.io.EsriErrorCode
        public String getDescription() {
            return getMessage();
        }
    }

    /* loaded from: classes.dex */
    public enum STATUS {
        INITIALIZED(0),
        LAYER_LOADED(1),
        LAYER_LOADING_FAILED(2),
        INITIALIZATION_FAILED(-1000);
        
        final int a;
        EsriErrorCode b;

        STATUS(int i) {
            this.a = i;
            if (i < 0) {
                if (i > -10000) {
                    this.b = new EsriStatusException(i);
                } else if (i < -10000) {
                    this.b = new EsriSecurityException(i);
                } else {
                    this.b = null;
                }
            }
        }

        public int getValue() {
            EsriErrorCode esriErrorCode = this.b;
            return (esriErrorCode == null || this != INITIALIZATION_FAILED) ? this.a : esriErrorCode instanceof EsriStatusException ? ((EsriStatusException) esriErrorCode).a : ((EsriSecurityException) esriErrorCode).getCode();
        }

        public static STATUS fromInt(int i) {
            if (i != 0) {
                if (i != 1) {
                    if (i != 2) {
                        if (i < 0) {
                            STATUS status = INITIALIZATION_FAILED;
                            if (i > -10000) {
                                status.b = new EsriStatusException(i);
                            } else if (i < -10000) {
                                status.b = new EsriSecurityException(i);
                            } else {
                                status.b = null;
                            }
                            return status;
                        }
                        return null;
                    }
                    return LAYER_LOADING_FAILED;
                }
                return LAYER_LOADED;
            }
            return INITIALIZED;
        }

        public EsriErrorCode getError() {
            return this.b;
        }

        public static STATUS fromInt(int i, EsriErrorCode esriErrorCode) {
            STATUS fromInt = fromInt(i);
            fromInt.b = esriErrorCode;
            return fromInt;
        }
    }
}
